<template>
<div style="display:flex;line-height:60px;">
  <div style="margin-top: 8px">
    <i :class="iScollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 20px" @click="submit"></i>
  </div>
  <div style="flex: 1;text-align: center;font-size: 34px">欢迎来到仓库管理系统</div>
  <el-dropdown>
    <span>王小虎</span>
    <i class="el-icon-arrow-down" style="margin-left:5px"></i>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item @click.native="toUser">个人中心</el-dropdown-item>
      <el-dropdown-item @click.native="out">退出登陆</el-dropdown-item>
    </el-dropdown-menu>
    
  </el-dropdown>
  
</div>
</template>

<script>
export default {
  name: "MyHeader",
  data(){
    return{
      unclass:"el-icon-s-fold"
    }
  },
  props: {
    iScollapse: Boolean
  },
  methods:{
    toUser(){
      console.log("toUser");
    },
    out(){
      console.log("out");
    },
    submit(){
      this.$emit("submit")
    }
  }
}
</script>

<style scoped>

</style>